package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.ExWarehouseDtl;
import com.xmtlxx.wms.domain.bo.ExWarehouseDtlBo;
import com.xmtlxx.wms.domain.vo.ExWarehouseDtlVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 出库明细Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface ExWarehouseDtlMapper extends BaseMapperPlus<ExWarehouseDtlMapper, ExWarehouseDtl, ExWarehouseDtlVo> {
    /**
     * 根据条件分页查询出库明细
     *
     * @param exWarehouseDtl 出库明细
     * @return Page ExWarehouseDtl
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "wa.create_by"),
        @DataColumn(key = "deptName", value = "s.dept_id"),
        @DataColumn(key = "userName", value = "wa.create_by")
    })
    Page<ExWarehouseDtlVo> selectPageExWarehouseDtlList(@Param("page") Page<ExWarehouseDtl> page,@Param("exWarehouseDtl") ExWarehouseDtlBo exWarehouseDtl);

    /**
     * 查询出库明细列表
     *
     * @param exWarehouseDtl 出库明细
     * @return 出库明细集合
//     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "wa.create_by"),
//        @DataColumn(key = "deptName", value = "s.dept_id"),
//        @DataColumn(key = "userName", value = "wa.create_by")
//    })
    List<ExWarehouseDtlVo> selectExWarehouseDtlList(@Param("exWarehouseDtl") ExWarehouseDtlBo exWarehouseDtl);

    ExWarehouseDtlVo selectExWarehouseDtlVoByID(String id);

    Boolean deleteVoById(String id);

    List<ExWarehouseDtl> selectExWarehouseDtl(@Param("exWarehouseDtl") ExWarehouseDtlBo exWarehouseDtl);

    int updateExWarehouseDtl(@Param("exWarehouseDtl") ExWarehouseDtl exWarehouseDtl);

    int updateExWarehouseDtlBatchById(@Param("list") List<ExWarehouseDtl> exWarehouseDtl);

    void removeExWarehouseDtlBatch(@Param("list") List<ExWarehouseDtl> exWarehouseDtl);
}
